﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace phpmk.ADM.Core.Model
{
    [AttributeUsage(AttributeTargets.Field, AllowMultiple = true, Inherited = true)]
    class Configurable : Attribute
    {

        public Configurable(bool isAttribute)
        {
            this.comment = "";
            this.isAttribute = isAttribute;
            this.defaultValue = "";
        }
        
        public Configurable(string comment, bool isAttribute)
        {
            this.comment = comment;
            this.isAttribute = isAttribute;
            this.defaultValue = "";
        }

        public Configurable(string comment)
        {
            this.comment = comment;
            this.isAttribute = false;
            this.defaultValue = "";
        }

        public Configurable(string comment, string defaultValue, bool isAttribute)
        {
            this.comment = comment;
            this.isAttribute = isAttribute;
            this.defaultValue = defaultValue;
        }

        public Configurable(string comment, string defaultValue)
        {
            this.comment = comment;
            this.defaultValue = defaultValue;
            this.isAttribute = false;
        }

        public Configurable()
        {
            this.comment = "";
            this.isAttribute = false;
            this.defaultValue = "";
        }

        protected String defaultValue;
        public String DefaultValue { get { return this.defaultValue; } }

        protected String comment;
        public String Comment { get { return this.comment; } }

        protected bool isAttribute;
        public bool IsAttribute { get { return this.isAttribute; } }
    }
}
